<template>
   <div class='tmpl'>

       login
       <div>
           <ul>
               <li v-for="(item,idx) in $store.state.city.list" :key="idx">{{item}}</li>
           </ul>
       </div>
   </div>
</template>

<style scoped>

</style>

<script>

export default {
//    声明使用哪个模板，默认是default
    layout:"layout",
    data() {
        return {
            list:[]
        }
    },
    // 这样写单页面效果
    async asyncData({ app }) {
        const {status,list} = await app.$axios.$get('/city/list');
        console.log(list);

        return { list }
    }
}
</script>
